package team.scau.laboratory_repair.modules.po;

import lombok.*;
import team.scau.laboratory_repair.common.base.BaseModel;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * @author 30254
 * creadtedate:2018/8/19
 */

@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Entity
@Table(name = "lab_user")
public class User extends BaseModel {

    @Builder
    public User(Long id, Timestamp createTime, Timestamp updateTime, Timestamp deleteTime, Boolean valid, String username, String password, Long role, String account, String phoneNumber, Long leadershipId) {
        super(id, createTime, updateTime, deleteTime, valid);
        this.username = username;
        this.password = password;
        this.role = role;
        this.account = account;
        this.phoneNumber = phoneNumber;
        this.leadershipId = leadershipId;
    }

    @Column
    private String username;
    @Column
    private String password;
    @Column
    private Long role;
    @Column
    private String account;
    @Column
    private String phoneNumber;
    @Column
    private Long leadershipId;
}
